﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class ttdn : System.Web.UI.Page
{
    String module = null;
    Control ct;
    protected void Page_Load(object sender, EventArgs e)
    {

        Viewdn.ActiveViewIndex = 0;
        // module = Request["i"].ToString().Trim();
        switch (module)
        {
            case "sp":
                ct = Page.LoadControl("~/Sanpham/Addsp.ascx");
                break;
            case "dn":
                ct = Page.LoadControl("~/Doanhnghiep/Adddn.ascx");
                break;
        }
    }
    protected void lbAdddn_Click(object sender, EventArgs e)
    {

        //lbtAddkcn.Visible = false;
        //lbAdddn.Visible = true;
        
      /*/  (adddn.FindControl("lbAdddn") as Label).Text = "Them DN";
        (adddn.FindControl("txtmaql") as TextBox).Text = "";
        (adddn.FindControl("txttendn") as TextBox).Text = "";
        (adddn.FindControl("txtgiamdoc") as TextBox).Text = "";
        (adddn.FindControl("txtdchi_dn") as TextBox).Text = "";
        (adddn.FindControl("txtdthoai") as TextBox).Text = "";
        (adddn.FindControl("txtfax") as TextBox).Text = "";
        (adddn.FindControl("txtemail_dn") as TextBox).Text = "";
        (adddn.FindControl("txtwebsite") as TextBox).Text = "";
        (adddn.FindControl("txtstk") as TextBox).Text = "";
        (adddn.FindControl("txtX") as TextBox).Text = "";
        (adddn.FindControl("txtY") as TextBox).Text = "";
        (adddn.FindControl("txtnamhd_dn") as TextBox).Text = "";
        (adddn.FindControl("txtGPKD") as TextBox).Text = "";
        (adddn.FindControl("txtGPDT") as TextBox).Text = "";
        (adddn.FindControl("QTSX") as TextBox).Text = "";
        (adddn.FindControl("tinhinhhd") as TextBox).Text = "";
        (adddn.FindControl("txtghichu") as TextBox).Text = "";*/
        // Viewkcn.ActiveViewIndex = 1;
       // Viewdn.ActiveViewIndex = 0;
    }
    protected void lbAddsp_Click(object sender, EventArgs e)
    {

        //lbtAddkcn.Visible = false;
        //lb_themsp.Visible = true;
       /* (addsp.FindControl("lb_themsp") as Label).Text = "Them san pham";
        (addsp.FindControl("txttensp") as TextBox).Text = "";
        (addsp.FindControl("txtnam") as TextBox).Text = "";
        (addsp.FindControl("txtthang") as TextBox).Text = "";
        (addsp.FindControl("txtCSTK") as TextBox).Text = "";
        (addsp.FindControl("txtCSTT") as TextBox).Text = "";
        (addsp.FindControl("txtdvi") as TextBox).Text = "";

        //Viewsp.ActiveViewIndex = 0;
        //Viewdn.ActiveViewChanged = 0;
        //Viewdn.Visible = false;

        // Viewkcn.ActiveViewIndex = 1;*/
       
        
    }
}
